package com.cli.spring_session_demo.mapper;

import com.cli.spring_session_demo.model.User;
import org.apache.ibatis.annotations.Param;

/**
 * @Author xiongmin
 * @Description //TODO
 * @Date 2020/4/2 18:37
 * @Version 1.0
 **/
public interface UserMapper {

    /**
     * @Todo 通过用户名和密码来搜索user
     * @param account
     * @param password
     * @return
     */
    User findUserByAccountAndPassword(@Param("account") String account,@Param("password") String password);

    /**
     * @Todo 通过userId来搜索user
     * @param userId
     * @return
     */
    User findUserByUserId(@Param("userId") long userId);

    /**
     * @Todo 新增用户
     * @param user
     * @return
     */
    void save(User user);
}
